Skip to content

fix(cache): improve NFS/lock error handling in DefaultCacheStore#6997

Open
matthdsm wants to merge 1 commit intonextflow-io:masterfrom
matthdsm:fix/cache-db-nfs-error
Open

fix(cache): improve NFS/lock error handling in DefaultCacheStore#6997
matthdsm wants to merge 1 commit intonextflow-io:masterfrom
matthdsm:fix/cache-db-nfs-error

Conversation

@matthdsm
Copy link
Copy Markdown
Contributor

@matthdsm matthdsm commented Apr 1, 2026

Potential fix for #6996

Three improvements to DefaultCacheStore.openDb():

  1. Log root cause: the underlying LevelDB exception is now logged at DEBUG level so it appears in .nextflow.log, aiding diagnosis.

  2. Add NXF_CACHE_DIR env-var support: the new resolveCacheBaseDir() helper checks for the NXF_CACHE_DIR environment variable and uses it as the base directory for the LevelDB cache. This lets users on NFS / Lustre / GPFS clusters redirect only the cache DB to a local path (e.g. /tmp) without having to move the entire pipeline launch directory.

  3. Improve error message: the previous message incorrectly advised users to use '-w' (which controls the work directory, not the cache directory). The new message accurately describes the root cause and documents both remedies: running from a local directory with -w, or setting NXF_CACHE_DIR.

Fixes: DefaultCacheStore caught a generic Exception from LevelDB when the launch directory is on a filesystem without POSIX file-lock support (NFS, Lustre, GPFS, BeeGFS, …) and emitted a misleading error message.

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 1, 2026

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit 8d4a247
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs-staging/deploys/69cd1a6da195cd0008fe2ae6

Three improvements to DefaultCacheStore.openDb():

1. Log root cause: the underlying LevelDB exception is now logged at
   DEBUG level so it appears in .nextflow.log, aiding diagnosis.

2. Add NXF_CACHE_DIR env-var support: the new resolveCacheBaseDir()
   helper checks for the NXF_CACHE_DIR environment variable and uses it
   as the base directory for the LevelDB cache. This lets users on NFS /
   Lustre / GPFS clusters redirect only the cache DB to a local path
   (e.g. /tmp) without having to move the entire pipeline launch
   directory.

3. Improve error message: the previous message incorrectly advised users
   to use '-w' (which controls the work directory, not the cache
   directory). The new message accurately describes the root cause and
   documents both remedies: running from a local directory with -w, or
   setting NXF_CACHE_DIR.

Fixes: DefaultCacheStore caught a generic Exception from LevelDB when
the launch directory is on a filesystem without POSIX file-lock support
(NFS, Lustre, GPFS, BeeGFS, …) and emitted a misleading error message.

Signed-off-by: Matthias De Smet <11850640+matthdsm@users.noreply.github.com>
@matthdsm matthdsm force-pushed the fix/cache-db-nfs-error branch from c630463 to 8d4a247 Compare April 1, 2026 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant